package view
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.geom.Point;
	
	public class TileObject extends GameObject
	{
		public function TileObject()
		{
			super();
		}
		
		override public function startUp():void {
			super.startUp();
		}
		
		override public function shutDown():void {
			super.shutDown();
		}
		
		override public function enterFrame():void {
			this.x -= this.viewObject.speed;
		}
		
		override public function copyToBackBuffer(b:BitmapData):void {
			trace(b+"....................................numlllllllllllllllllllllllllllll");
			if(this.bitmapData) {
				b.copyPixels(this.bitmapData,this.bitmapData.rect,new Point(this.x,this.y));
				var bitmap:Bitmap = new Bitmap(this.bitmapData);
				
				bitmap.x = 100;
				bitmap.y = 100;
				
				this.stage.addChild(bitmap);
			}
		}
		
	}
}